package com.baizhi.cmfzdemo.controller;

import com.baizhi.cmfzdemo.entity.CmfzMenu;
import com.baizhi.cmfzdemo.entity.CmfzMenuDto;
import com.baizhi.cmfzdemo.service.CmfzMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by 54433 on 2019/4/3.
 */
@Controller
public class CmfzMuneControlelr {
    @Autowired
    private CmfzMenuService cmfzMenuService;

    @RequestMapping("/queryAllMune")
    public @ResponseBody List<CmfzMenu> queryAllMune(){
        System.out.println(cmfzMenuService.queryAllMenu());
        System.out.println("********************");
        return cmfzMenuService.queryAllMenu();
    }
    @RequestMapping("/queryOneMenu")
    @ResponseBody
    public List<CmfzMenuDto> queryOneMenu(){
        return cmfzMenuService.queryAllMenuOne();
    }
}
